<?php

class Application_Form_Login extends Zend_Form {

    public function init() {

        $password = new Zend_Form_Element_Password('password', array(
                    'label' => 'Hasło'
                ));
        $password->setRequired(true);

        $login = new Zend_Form_Element_Text('login', array(
                    'label' => 'Login'
                ));
        $login
                ->setRequired(true)
                ->addValidator('notEmpty')
                ->addValidator('stringLength', false, array(3, 16));


        $this->addDisplayGroup(array(
            $login, $password
                ), 'gr-main');
        $submit = new Zend_Form_Element_Submit('submit', array());
        
        $this->addDisplayGroup(array(
            $submit
                ), 'gr-submit', array(
            'order' => 999
        ));
    }
}

